import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loginData: {}
  },
  getters: {
  },
  mutations: {
    setLoginData(state, loginData) {
      state.loginData = loginData
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [createPersistedState({  // 持久化存储
    storage: window.localStorage,
  })]

})
